﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XChip_Common
{
   public class USBDeviceModel
    {
        public string DevicePath { get; set; }
        public string DeviceName { get; set; }
        public string PID { get; set; }
        public string VID { get; set; }
        /// <summary>
        /// 是否打开设备
        /// </summary>
        public bool IsOpen { get; set; }
        /// <summary>
        /// 选择设备ID
        /// </summary>
        public int Index { get; set; }
    }

    /// <summary>
    /// 用于操作USB设备的帮助类型
    /// </summary>
    public static class USBDeviceHelp
    {
        private static List<USBDeviceModel> usbDev;

        public static List<USBDeviceModel> UsbDev
        {
            get
            {
                if (null == usbDev)
                {
                    usbDev = new List<USBDeviceModel>();
                }
                return usbDev;
            }

            set
            {
                usbDev = value;
            }
        }
    }
}
